<?php 
session_start();
 if (!isset($_SESSION['login']) or !isset($_SESSION['senha'])) {
 	header('location: login.html');
 }

   include "conexao/conexao.php";
?>
<html>
<head>
	<title>SGA - Sistema de Gerenciamento Administrativo - Principal</title>
	<link href="menu_assets/styles.css" rel="stylesheet" type="text/css">
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<script type="text/javascript">
		function confirmsair(){
		var resp = confirm("Deseja realmente sair ?");

		if(resp){
			document.location="index.html";
		}
	}

	function confirmsair(){
		var sair = confirm("Deseja sair?");
		if(sair == true){
			window.location.href="logout.php";
		}
	}
</script>
<body>
      <div id='cssmenu'>
         <ul>
            <li><a href='index.php'><span>Home</span></a></li>
            <li class='has-sub'><a href='#'><span>Funcionarios</span></a>
               <ul>
                  <li><a href='index.php?page=funcionario/novofuncionario.php'><span>Cadastrar Funcionário</span></a></li>
                  <li class='last'><a href='index.php?page=funcionario/funcionario.php'><span>Listar Funcionários</span></a></li>
               </ul>
            </li>
            <li class='has-sub'><a href='#'><span>Ferramenta</span></a>
               <ul>
                  <li><a href='#'><span>Cadastrar Ferramenta</span></a></li>
                  <li class='last'><a href='#'><span>Listar Ferramentas</span></a></li>
               </ul>
            </li>
            <li class='has-sub'><a href='#'><span>Requisições</span></a>
               <ul>
                  <li><a href='index.php?page=requisicao/requisicao.php'><span>Nova Requisição</span></a></li>
                  <li class='last'><a href='#'><span>Listar Requisições</span></a></li>
               </ul>
            </li>
            <li><a href='#'><span>About</span></a></li>
            <li><a href='#'><span>Contact</span></a></li>
            <li class='last'><a href='#' onclick="confirmsair()"><span>Sair</span></a></li>
         </ul>
      </div>
      <div id="content">
         <?php 
            if (isset($_GET['page']) || !empty($_GET['page'])) {
               $page = $_GET['page'];
               include ($page);
            }
         ?>
      </div>
</body>
</html>